home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / mint / netlib / include / netinfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-27  |  1.5 KB  |  58 lines

  1. #ifndef _NETINFO_H
  2. #define _NETINFO_H
  3.  
  4. /*
  5.  * Don't want external declarations that belong to sockdev.xdd
  6.  */
  7. #define NOEXTERNS
  8.  
  9. #ifndef NETINFO
  10. #define NETINFO netinfo
  11.  
  12. struct netinfo;
  13. extern struct netinfo *NETINFO;
  14.  
  15. #define buf_alloc    (*NETINFO->_buf_alloc)
  16. #define buf_free    (*NETINFO->_buf_free)
  17. #define buf_reserve    (*NETINFO->_buf_reserve)
  18. #define buf_deref    (*NETINFO->_buf_deref)
  19.  
  20. #define if_enqueue    (*NETINFO->_if_enqueue)
  21. #define if_dequeue    (*NETINFO->_if_dequeue)
  22. #define if_register    (*NETINFO->_if_register)
  23. #define if_input    (*NETINFO->_if_input)
  24. #define if_flushq    (*NETINFO->_if_flushq)
  25. #define if_getfreeunit    (*NETINFO->_if_getfreeunit)
  26.  
  27. #define in_chksum    (*NETINFO->_in_chksum)
  28.  
  29. #define eth_build_hdr    (*NETINFO->_eth_build_hdr)
  30. #define eth_remove_hdr    (*NETINFO->_eth_remove_hdr)
  31. #endif
  32.  
  33. #include "buf.h"
  34. #include "if.h"
  35.  
  36. struct netinfo {
  37.     BUF *    (*_buf_alloc) (unsigned long, unsigned long, short);
  38.     void    (*_buf_free) (BUF *, short);
  39.     BUF *    (*_buf_reserve) (BUF *, long, short);
  40.     void    (*_buf_deref) (BUF *, short);
  41.  
  42.     short    (*_if_enqueue) (struct ifq *, BUF *, short);
  43.     BUF *    (*_if_dequeue) (struct ifq *);
  44.     long    (*_if_register) (struct netif *);
  45.     short    (*_if_input) (struct netif *, BUF *, long, short);
  46.     void    (*_if_flushq) (struct ifq *);
  47.  
  48.     short    (*_in_chksum) (void *, short);
  49.     short    (*_if_getfreeunit) (char *);
  50.  
  51.     BUF *    (*_eth_build_hdr) (BUF *, struct netif *, char *, short);
  52.     short    (*_eth_remove_hdr) (BUF *);
  53.  
  54.     long    reserved[7];
  55. };
  56.  
  57. #endif /* _NETINFO_H */
  58.